﻿using FreeSql.DatabaseModel;using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace Unis.FMS.Platform.Order.Domain {

	[JsonObject(MemberSerialization.OptIn), Table(Name = "doc_dpt_task", DisableSyncStructure = true)]
	public partial class DocDptTask {

		[JsonProperty, Column(Name = "id", DbType = "bigint", IsPrimary = true)]
		public long Id { get; set; }

		/// <summary>
		/// 实际发生时间
		/// </summary>
		[JsonProperty, Column(Name = "actual_create_time", DbType = "datetime")]
		public DateTime ActualCreateTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 实际发生时间
		/// </summary>
		[JsonProperty, Column(Name = "actual_update_time", DbType = "datetime")]
		public DateTime ActualUpdateTime { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 预约日期
		/// </summary>
		[JsonProperty, Column(Name = "appointment_date", DbType = "datetime")]
		public DateTime AppointmentDate { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 预约时间起
		/// </summary>
		[JsonProperty, Column(Name = "appointment_time_from", DbType = "datetime")]
		public DateTime AppointmentTimeFrom { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 预约时间止
		/// </summary>
		[JsonProperty, Column(Name = "appointment_time_to", DbType = "datetime")]
		public DateTime AppointmentTimeTo { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 分配状态 0New 1Queue 2 Accepted 3 Assigned 4 Dispatched
		/// </summary>
		[JsonProperty, Column(Name = "assign_status", DbType = "tinyint")]
		public sbyte AssignStatus { get; set; } = 0;

		/// <summary>
		/// vrm vendor code
		/// </summary>
		[JsonProperty, Column(Name = "carrier_code", StringLength = 50, IsNullable = false)]
		public string CarrierCode { get; set; }

		/// <summary>
		/// vrm vendor name
		/// </summary>
		[JsonProperty, Column(Name = "carrier_name", StringLength = 50, IsNullable = false)]
		public string CarrierName { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "create_user", StringLength = 50, IsNullable = false)]
		public string CreateUser { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "created_by", DbType = "int")]
		public int CreatedBy { get; set; } = 0;

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty, Column(Name = "created_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime CreatedTime { get; set; }

		/// <summary>
		/// driver code
		/// </summary>
		[JsonProperty, Column(Name = "driver_code", StringLength = 50, IsNullable = false)]
		public string DriverCode { get; set; }

		/// <summary>
		/// driver name
		/// </summary>
		[JsonProperty, Column(Name = "driver_name", StringLength = 50, IsNullable = false)]
		public string DriverName { get; set; }

		/// <summary>
		/// Est Arrival Date From预计到达开始时间
		/// </summary>
		[JsonProperty, Column(Name = "eta_from", DbType = "datetime")]
		public DateTime EtaFrom { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// Est Arrival Date To 预计到达结束时间
		/// </summary>
		[JsonProperty, Column(Name = "eta_to", DbType = "datetime")]
		public DateTime EtaTo { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// Est Depature Date From预计发车开始时间
		/// </summary>
		[JsonProperty, Column(Name = "etd_from", DbType = "datetime")]
		public DateTime EtdFrom { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// Est Depature Date To 预计发车结束时间
		/// </summary>
		[JsonProperty, Column(Name = "etd_to", DbType = "datetime")]
		public DateTime EtdTo { get; set; } = DateTime.Parse("1970-01-01 00:00:00");

		/// <summary>
		/// 是否删除（0.正常 1.删除）;0.正常 1.删除
		/// </summary>
		[JsonProperty, Column(Name = "is_del", DbType = "int")]
		public int IsDel { get; set; } = 0;

		/// <summary>
		/// master order no
		/// </summary>
		[JsonProperty, Column(Name = "master_order_no", StringLength = 50, IsNullable = false)]
		public string MasterOrderNo { get; set; }

		[JsonProperty, Column(Name = "note", IsNullable = false)]
		public string Note { get; set; }

		[JsonProperty, Column(Name = "notes", IsNullable = false)]
		public string Notes { get; set; }

		/// <summary>
		/// 订单的ServiceLevel枚举值
		/// </summary>
		[JsonProperty, Column(Name = "order_service_level", DbType = "tinyint")]
		public sbyte OrderServiceLevel { get; set; } = 0;

		/// <summary>
		/// 包裹数
		/// </summary>
		[JsonProperty, Column(Name = "packages", DbType = "int")]
		public int Packages { get; set; } = 0;

		/// <summary>
		/// 0非必须预约；1必须预约
		/// </summary>
		[JsonProperty, Column(Name = "required_appointment", DbType = "tinyint")]
		public sbyte RequiredAppointment { get; set; } = 0;

		/// <summary>
		/// shipment order no
		/// </summary>
		[JsonProperty, Column(Name = "shipment_order_no", StringLength = 50, IsNullable = false)]
		public string ShipmentOrderNo { get; set; }

		/// <summary>
		/// shipment type枚举
		/// </summary>
		[JsonProperty, Column(Name = "shipment_type", DbType = "tinyint")]
		public sbyte ShipmentType { get; set; } = 0;

		/// <summary>
		/// 0New;1DryRun；2Copmlete；3UnDispatch
		/// </summary>
		[JsonProperty, Column(Name = "status", DbType = "tinyint")]
		public sbyte Status { get; set; } = 0;

		/// <summary>
		/// task no
		/// </summary>
		[JsonProperty, Column(Name = "task_no", DbType = "bigint")]
		public long TaskNo { get; set; } = 0;

		/// <summary>
		/// 候选值：Adult Signature、Consignee Signature、Regular Signature、No Signature Requirement
		/// </summary>
		[JsonProperty, Column(Name = "task_signature_type", DbType = "tinyint")]
		public sbyte TaskSignatureType { get; set; } = 0;

		/// <summary>
		/// task 模板id
		/// </summary>
		[JsonProperty, Column(Name = "task_template_id", DbType = "int")]
		public int TaskTemplateId { get; set; } = 0;

		/// <summary>
		/// Task type 枚举
		/// </summary>
		[JsonProperty, Column(Name = "task_type", DbType = "tinyint")]
		public sbyte TaskType { get; set; } = 0;

		/// <summary>
		/// Task属于什么类型 Delivery Task/Pickup Task/ Service Task /Linehaul
		/// </summary>
		[JsonProperty, Column(Name = "task_type_group", StringLength = 50, IsNullable = false)]
		public string TaskTypeGroup { get; set; }

		/// <summary>
		/// tracking no
		/// </summary>
		[JsonProperty, Column(Name = "tracking_no", StringLength = 50, IsNullable = false)]
		public string TrackingNo { get; set; }

		/// <summary>
		/// 更新人
		/// </summary>
		[JsonProperty, Column(Name = "update_by", DbType = "int")]
		public int UpdateBy { get; set; } = 0;

		/// <summary>
		/// 更新时间
		/// </summary>
		[JsonProperty, Column(Name = "update_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime UpdateTime { get; set; }

		/// <summary>
		/// 修改人
		/// </summary>
		[JsonProperty, Column(Name = "update_user", StringLength = 50, IsNullable = false)]
		public string UpdateUser { get; set; }

		/// <summary>
		/// work order no
		/// </summary>
		[JsonProperty, Column(Name = "work_order_no", StringLength = 50, IsNullable = false)]
		public string WorkOrderNo { get; set; }

	}

}
